/** 
 * Project Name:ecs-channel 
 * File Name:OrderListGetRequest.java 
 * Package Name:com.jala.ecschannel.isv.xhs.api.request 
 * Date:2018年5月14日下午2:36:56 
 * Copyright (c) 2018, liuyinsong@jala.com.cn All Rights Reserved. 
 * 
 */  
package com.grape.ciq.api.redbook.request;

import java.util.HashMap;
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import com.grape.ciq.api.redbook.ApiRuleException;
import com.grape.ciq.api.redbook.base.XHSRequest;
import com.grape.ciq.api.redbook.model.OrderListGet;
import com.grape.ciq.api.redbook.response.OrderListGetResponse;

/** 
 * ClassName: OrderListGetRequest <br/> 
 * Function: TODO ADD FUNCTION. <br/> 
 * date: 2018年5月14日 下午2:36:56 <br/> 
 * @author liuyinsong
 */
@JsonIgnoreProperties(ignoreUnknown=true) 
public class OrderListGetRequest extends XHSRequest<OrderListGetResponse> {

	private static final long serialVersionUID = 8433120831429671001L;

	//URL:/ark/open_api/v0/packages{?start_time}{?end_time}{?status}{?page_no}{?page_size}{?logistics}
	@Override
	public void check() throws ApiRuleException {
	}

	@Override
	public String getMethodUrl() {
		return "/ark/open_api/v0/packages?";
	}
	
	@Override
	public String getMethod() {
		return "GET";
	}

	@Override
	public Map<String, Object> getParams() {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("end_time", orderListGet.getEnd_time());
		map.put("logistics", orderListGet.getLogistics());
		map.put("page_no", orderListGet.getPage_no());
		map.put("page_size", orderListGet.getPage_size());
		map.put("start_time", orderListGet.getStart_time());
		map.put("status", orderListGet.getStatus());
		return map;
	}

	@Override
	public String getUrlParams() {
		return "";
	}
	
	private OrderListGet orderListGet;

	public OrderListGet getOrderListGet() {
		return orderListGet;
	}

	public void setOrderListGet(OrderListGet orderListGet) {
		this.orderListGet = orderListGet;
	}

}
